package lifei.lifei.mybatis.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_logs")
public class SysLog implements Serializable {
  /**若执行测试抛出异常:org.apache...ReflectionException
   * class com.lifei.mybatis.pojo.SysLog的属性id为一个值
   * IllegaArgumentException:参数类型不匹配
   * 解决方法：
   * @TableId指定自增的策略，value与数据库主键列名一致
     若实体类属性名与主键名一致可以省略value
   */
  @TableId(value = "id",type = IdType.AUTO)
  private Integer id;
  private String username;
  private String operation;
  private String method;
  private String params;
  private Integer time;
  private String ip;
  //@TableField(value="createdTime")
  private Date createdTime;



}
